package org.netty.push.server.channel;

import java.util.concurrent.ConcurrentHashMap;

import org.springframework.util.Assert;

import io.netty.channel.Channel;

public class ChannelHolderUtlil {
	private static  ConcurrentHashMap<String, Channel> holder=new ConcurrentHashMap<String, Channel>();

	public static void  put(String deviceToken,Channel channel) {
		Assert.notNull(deviceToken, "deviceToken  must not null");
		holder.putIfAbsent(deviceToken, channel);
	}
	public static Channel  get(String deviceToken) {
		Assert.notNull(deviceToken, "deviceToken must not null");
		return holder.get(deviceToken);
	}
}
